#ifndef KDTREENODE_H
#define KDTREENODE_H

#include <vector>
#include "Triangle.h"
#include "vecmath.h"

using namespace std;

class KDTreeNode
{
public:
	vector<Triangle*> triangles;
	KDTreeNode* frontChild;
	KDTreeNode* backChild;
	Point3 position;
	Vector3 planeNormal;
	BoundingBox AABB;
	
	KDTreeNode();
	~KDTreeNode();

	void addTriangle( Triangle* t );
	vector<Triangle*> getTriangles();

	void setPosition(float x, float y, float z);
	void setFrontChild( KDTreeNode* newNode );
	void setBackChild( KDTreeNode* newNode );

	Point3 getPosition();
	KDTreeNode* getFrontChild();
	KDTreeNode* getBackChild();
};

#endif